<template>
    <list-page
        :pager="pager"
        :data="approveData"
        :showSelectSearch="false"
        :showSelectTips="false"
        :placeholder="placeholder"
        @searchByKey="searchByKey"
        @searchReset="searchReset"
        @changePageSize="changePageSize"
        @changeCurrentPage="changeCurrentPage">
        <template slot="table">
            <el-table
                :data="approveData"
                align="center"
                ref="multipleTable">
                <el-table-column label="序号" prop="index"></el-table-column>
                <el-table-column label="考核类型" prop="approveType" ></el-table-column>
                <el-table-column label="考核事项" prop="approveItem" ></el-table-column>
                <el-table-column label="处理方式" prop="handleModel"></el-table-column>
                <el-table-column label="考核综合评分" prop="approveScore"></el-table-column>
                <el-table-column label="考核综合评级" prop="approveGrade"></el-table-column>
                <el-table-column label="考核时间"  prop="approveDate"></el-table-column>
            </el-table>
        </template>
    </list-page>
</template>

<script>
    import pager from '@/assets/vue-mixin/pager'
    import {get} from "~/utils/dbl"
    import {mapState} from 'vuex'
    import {fetchList, getObj} from '~/views/wy-assess/api/wyassessitem'
    export default {
        name: "approve-record",
        mixins: [pager],
        props:['pid'],
        data(){
            return{
                approveData:[],
                searchForm:{},
                placeholder:'请输入考核事项'
            }
        },
        methods:{
            getListData(){
                this.approveData=[{
                    approveType:'xx',
                    approveItem:'物业缴费',
                    handleModel:' 每累计不按时缴纳1次费用 ',
                    approveScore:'80',
                    approveGrade:'良好',
                    approveDate:'2020-2-9',
                }]

                //fetchList(Object.assign({}, this.pageParams, this.searchForm)).then(resp => {
                //     this.setListData(resp.data)
                // })
            },
            searchReset() {
                // console.log("====searchReset")
                //清空选中的数据
                this.searchForm = {}
                //重新查询
                this.resetList()
            },
            searchByKey(val) {
                // console.log('searchByKey', this.searchDataFrom);
                //qh+:模糊查询
                // alert("搜索值为："+val);
                //获取输入的值
                if(val){
                    this.searchForm.approveItem=val;
                }else {
                    delete this.searchForm.approveItem
                }
                this.resetList()
            },

        }
    }
</script>

